#ifndef _TC_PHYSICS
#define _TC_PHYSICS

#include <tcCommon/tc_common.h>
#include <tcCommon/tc_math.h>


#ifdef __cplusplus
extern "C" 
{
#endif

tcExport void tc_physics_init();
tcExport void tc_physics_exit();
tcExport void tc_physics_update(float dt);

tcExport void tc_physics_create_hinge(tc_vector2 position, float width, float height);

tcExport void tc_chessman_create_body(int id);
tcExport void tc_chessman_destroy_body(int id);
tcExport void tc_physics_adjust_body_size(int id);

tcExport void tc_chessman_set_body_active(int id, BOOL active);

tcExport void tc_chessman_set_transform(int id, tc_vector2 position, float rotation);
tcExport void tc_chessman_get_position(int id, tc_vector2 *position);
tcExport float tc_chessman_get_rotation(int id);

tcExport float tc_chessman_get_radius(int id);

tcExport void tc_chessman_apply_impulse(int id, tc_vector2 impulse);

tcExport void tc_chessman_get_velocity(int id, tc_vector2 *velocity);


#ifdef __cplusplus
}
#endif

#endif